<%@ page import="com.mastercard.Transaction" %>



<div class="fieldcontain ${hasErrors(bean: transactionInstance, field: 'expiryDate', 'error')} ">
	<label for="expiryDate">
		<g:message code="transaction.expiryDate.label" default="Expiry Date" />
		
	</label>
	<g:datePicker name="expiryDate" precision="day"  value="${transactionInstance?.expiryDate}" default="none" noSelection="['': '']" />
</div>

<div class="fieldcontain ${hasErrors(bean: transactionInstance, field: 'account', 'error')} ">
	<label for="account">
		<g:message code="transaction.account.label" default="Account" />
		
	</label>
	<g:textField name="account" value="${transactionInstance?.account}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: transactionInstance, field: 'amount', 'error')} required">
	<label for="amount">
		<g:message code="transaction.amount.label" default="Amount" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="amount" required="" value="${fieldValue(bean: transactionInstance, field: 'amount')}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: transactionInstance, field: 'categories', 'error')} ">
	<label for="categories">
		<g:message code="transaction.categories.label" default="Categories" />
		
	</label>
	<g:select name="categories" from="${com.mastercard.Category.list()}" multiple="multiple" optionKey="id" size="5" value="${transactionInstance?.categories*.id}" class="many-to-many"/>
</div>

<div class="fieldcontain ${hasErrors(bean: transactionInstance, field: 'createdBy', 'error')} ">
	<label for="createdBy">
		<g:message code="transaction.createdBy.label" default="Created By" />
		
	</label>
	<g:textField name="createdBy" value="${transactionInstance?.createdBy}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: transactionInstance, field: 'createdDate', 'error')} required">
	<label for="createdDate">
		<g:message code="transaction.createdDate.label" default="Created Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="createdDate" precision="day"  value="${transactionInstance?.createdDate}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: transactionInstance, field: 'creditCard', 'error')} required">
	<label for="creditCard">
		<g:message code="transaction.creditCard.label" default="Credit Card" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="creditCard" name="creditCard.id" from="${com.mastercard.CreditCard.list()}" optionKey="id" required="" value="${transactionInstance?.creditCard?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: transactionInstance, field: 'currency', 'error')} ">
	<label for="currency">
		<g:message code="transaction.currency.label" default="Currency" />
		
	</label>
	<g:textField name="currency" value="${transactionInstance?.currency}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: transactionInstance, field: 'datetime', 'error')} required">
	<label for="datetime">
		<g:message code="transaction.datetime.label" default="Datetime" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="datetime" precision="day"  value="${transactionInstance?.datetime}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: transactionInstance, field: 'type', 'error')} ">
	<label for="type">
		<g:message code="transaction.type.label" default="Type" />
		
	</label>
	<g:textField name="type" value="${transactionInstance?.type}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: transactionInstance, field: 'updatedBy', 'error')} ">
	<label for="updatedBy">
		<g:message code="transaction.updatedBy.label" default="Updated By" />
		
	</label>
	<g:textField name="updatedBy" value="${transactionInstance?.updatedBy}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: transactionInstance, field: 'updatedDate', 'error')} required">
	<label for="updatedDate">
		<g:message code="transaction.updatedDate.label" default="Updated Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="updatedDate" precision="day"  value="${transactionInstance?.updatedDate}"  />
</div>

